package com.baidu.threadPoolExcutor;

import java.util.concurrent.Callable;

public class MyCallable implements Callable<String> {
    private int i;

    public MyCallable() {
    }

    public MyCallable(int i) {
        this.i = i;
    }

    @Override
    public String call() throws Exception {
        int tmp = 0;
        for (int j = 1; j <= i; j++) {
            tmp += j;
        }

        return i + "的累加结果是" + tmp;
    }
}
